home *** CD-ROM | disk | FTP | other *** search
MS Visual FoxPro App | 1987-06-22 | 3.3 KB | 75 lines | [TEXT/MACA] |
- RRH.SystemTask.patch
- TEXTMACA
- Bonjour,
- You use Red Ryder Host 1.4 in a dedicated communications server application in
- your company and find that you cannot use this dedicated machine to run a mail
- server (inBox, TopMail...) or a disk server (MacServe, Tops...) because Host
- doesn't support desk accessories and drivers (DRVR resources).
- Well, a missing SystemTask trap call is the culprit! Scott Watson having
- decided to omit desk accessory support, he probably decided that a SystemTask
- was superfluous. SystemTask provides time for desk accessories and DRIVERS to
- do their stuff and that's what we're after. All (or at least most of them) of
- the servers use a DRVR to do their stuff but cannot operate if they don't
- receive some CPU time.
- The little patch shown below is for use on Red Ryder Host 1.4 ONLY as it is
- highly version dependant. You will need a file editor such as FEdit or
- MacSnoop to apply the patch.
- Open the Red Ryder Host 1.4 file and
- search for: 558F 3F3C FFFF 489D EB7E A970 101F 4880 48C0 2B40 F290 4AAD F290
- change for: A9B4 558F 3F3C FFFF 486D EB7E A970 101F 4880 48C0 2B40 F290 4A80
- Save the modified sector and you now have a SystemTasked RRH!
- *** Technical stuff ***
- The patch modifies the following code. Those of you using MacNosy can look at
- the complete
- proc58
- to see exactly what it does (a simple GetNextEvent loop).
- The SystemTask call is usually put close to a GetNextEvent to be executed as
- often as possible. For MacNosy users: GetNextEvent calls can also be found in
- proc127
- proc144
- and
- proc145
- . I was using versions 2.23 and 2.66 (as
- soon as I received it!) of Nosy.
- The patch involved finding a word that could be scrapped to make place for the
- SystemTask trap. Fortunatly, all compilers (Scott uses LightSpeed C) have
- problems
- or bits of code that are not not optimized. In this case,
- the result of GetNextEvent (a boolean, true if an event has occured) is moved
- from a register (D0) to a global variable (glob433(A5)) and the this same
- global is used to see if and event has occured. Well, the register D0 still
- holds the result, why not use it! And since this saves a word (2 bytes), we
- just found our space to put the SystemTask in!!!
- Here's the original code:
- proc58 SUBQ.L #2,A7 ; make space on stack
- PUSH #$FFFF ; eventMask
- PEA glob272(A5) ; aka EventRecord
- _GetNextEvent
- POP.B
- EXT
- EXT.L
- MOVE.L D0,glob433(A5) ; check if an event as occured
- TST.L glob433(A5)
- BEQ.S proc58.1 ; =0, no event, skip handling
- ... ; rest of proc58, event handling
- And with the modification made:
- proc58 _SystemTask
- SUBQ.L #2,A7
- PUSH #$FFFF
- PEA glob272(A5)
- _GetNextEvent
- POP.B
- EXT
- EXT.L
- MOVE.L D0,glob433(A5)
- TST.L D0
- BEQ.S proc58.1
- ...
- It has been running on two BBSs for two weeks now with no apparent problems.
- Please keep me informed of your results, good or bad.
- Martin Durand
- Sysop of Synapse, the ONLY truly French Red Ryder Host BBS
- (418) 658-6955, 300/1200/2400, 24 hours
- GEnie: MDURAND
- Compuserve: 76064,224
-